﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Windows.Storage;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Media.Imaging;

namespace EmprestaAE.Common.AttachedProperties
{
    class ButtonEx : Button
    {


        public static bool GetIsPressed(DependencyObject obj)
        {
            return (bool)obj.GetValue(IsPressedProperty);
        }

        public static void SetIsPressed(DependencyObject obj, bool value)
        {
            obj.SetValue(IsPressedProperty, value);
        }

        // Using a DependencyProperty as the backing store for IsPressed.  This enables animation, styling, binding, etc...
        public static readonly DependencyProperty IsPressedProperty =
            DependencyProperty.RegisterAttached("IsPressed", typeof(bool), typeof(ButtonEx), new PropertyMetadata(false, IsPressedAction));

        private static void IsPressedAction(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            
        }





        public static string GetImagePressedSource(DependencyObject obj)
        {
            return (string)obj.GetValue(ImagePressedSourceProperty);
        }

        public static void SetImagePressedSource(DependencyObject obj, string value)
        {
            obj.SetValue(ImagePressedSourceProperty, value);
        }

        // Using a DependencyProperty as the backing store for ImagePressedSource.  This enables animation, styling, binding, etc...
        public static readonly DependencyProperty ImagePressedSourceProperty =
            DependencyProperty.RegisterAttached("ImagePressedSource", typeof(string), typeof(ButtonEx), new PropertyMetadata(string.Empty));

        





        public static Image GetImage(DependencyObject obj)
        {
            return (Image)obj.GetValue(ImageProperty);
        }

        public static void SetImage(DependencyObject obj, Image value)
        {
            obj.SetValue(ImageProperty, value);
        }

        // Using a DependencyProperty as the backing store for Image.  This enables animation, styling, binding, etc...
        public static readonly DependencyProperty ImageProperty =
            DependencyProperty.RegisterAttached("Image", typeof(Image), typeof(ButtonEx), new PropertyMetadata(null, ChangeImageAction));

        private static void ChangeImageAction(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
                        
        }
    }
}
